1. Field of the Invention
The present invention relates to a numerically controlled machine tool and especially to the tool feedrate control of a numerical control unit.
2. Description of the Background Art
A numerical control unit performs numerical control processing in accordance with a machining program instructed from paper tape or the like and drives a machine tool according to the results of said processing, causing a workpiece to be machined as instructed.
FIG. 1 is a block diagram of a numerical control unit known in the art. A machining program read from a tape reader 11 is stored into a memory 12. When it is executed, the machining program is read from the memory 12 on a block basis. The program is first processed by a controller 17 containing a central processing unit (CPU), a control program memory, etc. The controller 17 then performs numerical control processing in accordance with the machining program, driving the servo motor of a machine tool 1 to move a table or a tool post according to a move command or carrying out control, such as machine tool 1 coolant ON/OFF, spindle forward rotation/reverse rotation/stop, via a control box 13. The numeral 16 indicates a control panel having controls for giving zeroing, jog and other commands, 14 a manual data input device (referred to as the "MDI") employed to manually enter various data to the controller 17, and 15 a display unit for displaying the current position and other data of the machine, said devices 11 to 17 comprising a computer numerical control unit (referred to as the "CNC unit"). Including the CPU, control program memory, etc., as described above, the controller 17 in the CNC unit performs predetermined numerical control processing on the basis of the control program and machining program, thereby controlling the machine tool 1. Generally, the machining of a workpiece on a machine tool is a removing operation which takes away an unnecessary portion as chips by the relative motion between a tool and the workpiece. In this removing operation, machining efficiency is determined by the amount of chips taken away per unit time. To increase the machining efficiency, this chip removal amount per unit time may only maximized. Practically, however, there are certain restrictions, e.g., the limitation of the load applied to the machine and tool and the accuracy required for a surface to be machined. Moreover, the chip removal amount per unit time is determined by machining conditions. In a turning operation, the machining conditions are workpiece speed per unit time, the relative feedrate of the tool to the workpiece, and the depth of cut by the tool into the workpiece. In a milling operation, the machining conditions are tool speed per unit time, the relative feedrate of the tool to the workpiece, and the depth of cut by the tool into the workpiece. Namely, in either of the turning and milling operations, controlling the relative feedrate of the tool to the workpiece preferably is an extremely significant machining element in the removing operation. An unnecessary reduction in this relative feedrate deteriorates the machining efficiency and increases machining time. Its increase over a permissible value adversely affects machining accuracy and overloads the tool, machine, and other system components.
FIG. 2 is a block diagram of the key components of a known feedrate control section. The machining program is read from the memory 12 in FIG. 1 block by block. Each block is analyzed by the controller 17 and the result of the controller analysis is then fed to a pulse distribution processor 21 as CNC command data 20 in FIG. 2, i.e., as the move command and feedrate command of each axis. The pulse distribution processor 21 calculates for each axis a travel pulse per unit time from the move command and feedrate command of each axis and feeds them to the servo controller 22 of each axis. This travel pulse is used by the servo controller 22 to drive a servo motor 23 of the machine tool 1.
In the CNC unit, there are generally two ways of moving the tool; one is to move the tool on a straight line as shown in FIG. 3(a) illustrating linear interpolation, and the other is to move the tool on an arc as shown in FIG. 3(b) illustrating circular interpolation. In the case of the linear interpolation, a feedrate F is a vectorial value connecting a starting point and an end point as shown in FIG. 3(a) and axial velocity components are: EQU Fz=Fcos.theta. EQU Fx=Fsin.theta.
where Fx is a velocity component in an X axis direction, Fz a velocity component in a Z axis direction, and .theta. an angle between a Z axis and a vector indicated by the starting point A and end point B.
When the tool moves on an arc, the feedrate F is always a tangential velocity vector value at a point on the arc as shown in FIG. 3(b), i.e.: ##EQU1##
The moving axes of a CNC machine tool include straight-motion axes and rotating axes. The straight-motion axes move on a straight line relative to coordinate axes, e.g., X, Y and Z axes shown in FIG. 14 illustrating control axes in the numerical control unit. The rotating axes make a rotary motion relative to the X, Y and Z axes, e.g., A, B and C axes. In the conventional art, the CNC unit controls the straight-motion axes and rotating axes in an entirely identical manner, i.e., when controlling the rotating axes, the CNC unit provides move command values as angles and handles all numerical values given for the feedrate F as linear velocity. For example, the CNC unit treats 1.degree. of the rotating axis as equivalent to 1 mm of the straight-motion axis, and processes the operations of the rotating and straight-motion axes equally, even though their operations are totally different inherently. In the CNC unit, the feedrate in a single specified block is always identical within that single block.
In the conventional CNC unit constructed as described above, the instructed feedrate F is the relative feedrate of the actual workpiece and tool if the straight-motion axes are specified. On the other hand, if the rotating axes, i.e., the axes rotating around the X, Y and Z axes, are specified, the specified feedrate works as the rotary speed of the rotating axis, i.e., angular velocity, as shown in FIG. 4(a) illustrating rotating axis feed control. Therefore, a relative feedrate FC of the workpiece and tool for the rotating axes is: ##EQU2## where F is the specified feedrate and r is a distance between the rotating axis center and tool. Hence, if it is desired to set the relative feedrate of the workpiece and tool to F, the feedrate F0 actually specified in the instruction must be as follows: ##EQU3## a first problem is that in programming, the specified feedrate F must be corrected according to Mathematical Expression 1 by taking into account the distance r between the rotating axis center and tool.
When the straight-motion axis and rotating axis are controlled simultaneously, the component of a numerical value provided by the feedrate F corresponding to each axis is identical to that employed when the straight-motion axes are controlled. It should be noted, however, that while the velocity components in straight-motion axis control remain unchanged in both magnitude and direction, those in rotating axis control change in direction as the tool moves (remain the same in magnitude), and the resultant composite feedrate in the tool advance direction varies as the tool moves. This is illustrated in FIG. 4(b) which shows feed control by the simultaneous control of the straight-motion and rotating axes. When the straight-motion axis (X axis) and rotating axis (C axis) are controlled simultaneously at the feedrate of F on the assumption that an X-axis increment command value (move command value in the X-axis direction) is x and a C-axis increment command value (rotation command value in the C-axis direction) is c, an X-axis feedrate (linear velocity) Fx and a C-axis feedrate (angular velocity) .omega. are: ##EQU4## Linear velocity Fc in C-axis control is represented by: ##EQU5##
Supposing that the velocity in the tool advance direction at starting point P1 is Ft and its X-axis and Y-axis velocity components are Ftx and Fty respectively, Ftx and Fty are represented: ##EQU6## where r is a distance between the rotating axis center and tool (unit: mm) and .theta. is an angle between point P1 and X axis at the center of rotation. According to Mathematical Expressions 1, 2, 3, 4 and 5, composite velocity Ft is: ##EQU7##
As indicated by Mathematical Expression 7, Ft is velocity at point P1. As the C axis rotates, the value of .theta. changes and the value of Ft also changes. To keep the relative speed, i.e., cutting speed Ft, of the workpiece and tool as constant as possible, therefore, the angular value instructed must be minimized and the variation of the .theta. value must be reduced. If the .theta. value of a portion to be machined is large, therefore, there arises a second problem that the feedrate must be decreased. Alternatively, the machining path may be sectioned and each section controlled by a separate block, requiring the processing of several blocks for an operation.
FIGS. 5(a)-(c) illustrate a program path in a corner, FIG. 5(a) indicating a programmed path and an actual tool path. Ideally, it is desired that the programmed path matches the actual tool path. Actually, however, they are always different in corner P due to a tracking delay, etc., in a servo system. Hence, if a tool 31 turns the corner P at an obtuse angle relative to a workpiece 30 as shown in FIG. 5(b), it turns in a direction of biting the workpiece. To avoid this, measures are taken, e.g., the feedrate of the tool 31 is reduced or the tool 31 is stopped at the corner for a while. Conversely, if the tool 31 turns the corner P at a sharp angle relative to the workpiece 30 as shown in FIG. 5(c), it does not bite the workpiece but problems arise, e.g., much of the metal is left uncut or a large load is suddenly applied to the tool 31.
FIGS. 6(a) and 6(b) illustrate a corner override function that may be used by some conventional CNC units to reduce the instructed feedrate within instructed distances Le and Ls before and after the corner P at an instructed ratio (override). However, the speed is only changed at two stages, i.e., a first change within the distances Le and Ls measured by starting at the corner P and a second change in the other areas. Accordingly, there is a third problem in that the feedrate must be set to meet the speed in the most reduced speed area within the distances Le and Ls starting at the corner P. Moreover, with this function, the feedrate tends to change too suddenly.
FIGS. 7(a) and 7(b) illustrate a drilling operation as an example of drilling a workpiece 30 with a drill tool 31. FIG. 7(a) shows that the tool 31 is just beginning to cut the workpiece 30. To carry out preferred machining, the feedrate should be decreased when the tool 31 makes contact with the workpiece 30 and increased when the tool 31 has completely bitten the workpiece 30. This is because, if the tool 31 is brought into contact with the workpiece 30 at an ordinary feedrate used for machining the workpiece 30, load is suddenly impressed to the tool 31, resulting in tool 31 breakage or position offset. Hence, the tool 31 is generally positioned up to point "a" slightly before the workpiece 30, the workpiece 30 is drilled at a reduced feedrate up to point "b" where the tool 31 would bite the workpiece 30 completely, and the workpiece 30 is drilled at the ordinary feedrate from point "b" onward.
An example in FIG. 7(b) shows that the tool 31 drills a through hole in the workpiece 30. In this case, if the tool 31 drills through the workpiece 30 at the ordinary feedrate, burrs are formed on the opposite surface of the workpiece. To avoid this, the workpiece 30 is generally drilled at the ordinary feedrate up to point "c" slightly before the tool 31 drills through the workpiece 30, and at a reduced feedrate from point "c" to a finish at point "d".
FIGS. 8(a) and 8(b) illustrate a drilling operation in a tapered portion of a workpiece, wherein FIG. 8(a) shows that the surface of the workpiece 30 that makes first contact with the tool 31 is beveled and FIG. 8(b) shows that the opposite surface is beveled. Particularly in these cases, unless the feedrate is dropped when the tool 31 makes contact with the workpiece 30 and when the tool 31 drills through the workpiece 30, drilling accuracy deteriorates, increasing the risk of breaking the tool. A fourth problem is that the machining path must be sectioned into several blocks to control the feedrate, as described above, and the feedrate for each block must be set for the worst-case scenario related to the cutting function performed in that block.
In FIGS. 9(a) and 9(b) illustrate the machining of a molding material workpiece, FIG. 9(a) shows that a workpiece 30, such as a molding material, is machined by a tool 31 and the workpiece has areas to be machined and unmachined by the tool. To increase machining efficiency and effectiveness, in accordance with the conventional teaching already described herein, the workpiece is machined in four blocks, a-b, b-c, c-d and d-e as shown in FIG. 9(b), even though the workpiece otherwise might be machined in a single block as shown in FIG. 9(a). In the machining of FIG. 9(b), it is desired at points where the workpiece is just beginning to be machined (points b and d) to decrease the feedrate of the tool 31 to soften impact on the tool 31 when it makes contact with the workpiece 30, and it is also desired at a point where the tool 31 leaves the workpiece 30 (point c) to reduce the feedrate so as not to generate burrs on the workpiece 30. However, since this change of feedrate further divides the blocks, there arises a fifth problem when the workpiece is actually machined as shown in FIG. 9(b). In particular, if quality errors still arise after consideration of the feedrate,at points b, c and d, it is inevitable that the entire feedrate must be reduced when the machining operation is performed.
FIG. 10 illustrating the machining operation of a midway die shows that the midway portion of a workpiece 30 is machined by a tool 31, wherein area a-b is a portion where the tool cuts into the workpiece and is gradually loaded, area b-c is a portion where certain load is kept applied to the tool, and area c-d is a portion where the load on the tool gradually decreases. The feedrate is generally determined with the feedrate in area b-c considered. However, if the tool is adversely affected by sudden overload in area a-b at the determined feedrate, there arises a sixth problem that it is inevitable to specify a reduced feedrate in consideration of feed in area a-b.
FIG. 11 illustrates a measurement function and shows that a workpiece 30 is measured with a measuring tool 31a, wherein the position of the workpiece 30 is measured by bringing the sensor tool 31a into contact with the workpiece 30. In this case, the measurement has been programmed in two blocks so that the tool is fed at a comparatively high rate up to point a slightly before the workpiece and at a lower measurement rate from point "a" to point "b". Because the machining path is divided into blocks in the vicinity of the measurement point (a-b) and the feedrate is reduced considerably in this area (a-b), there arises a seventh problem in that additional time is required to make measurements using the tool 31a.
FIG. 12 shows how control is carried out in no-entry area setting, illustrating a function which keeps checking whether a tool 31 enters an area 32 where the tool 31 must not enter and stops the tool at point "a" on a boundary if the tool is just beginning to enter the area 32. In this case, since the tool 31 is kept fed at the specified rate until it enters the no-entry area 32, there is an eighth problem in that the no-entry area must be defined slightly larger to ensure that the boundary is safely avoided.
In addition, generally the feedrate of a tool depends largely on an interrelation between the material of a workpiece and that of the tool. Hence, if the current tool is changed into a tool made of the other material during machining, there arises a ninth problem that the feedrate must be changed by making corrections to the machining program of the CNC unit.
Fuzzy inference logic may be applied to the control of machining operations. Fuzzy logic or fuzzy inference theory has been applied as an alternative to traditional expert systems that employ precise or "crisp" Boolean logic-based rules to the solution of problems involving judgment or control. Where the problems are complex and cannot be readily solved in accordance with the rigid principles of bilevel logic, the flexibility of fuzzy logic offers significant advantages in processing time and accuracy.
The theory of fuzzy logic has been published widely and is conveniently summarized in "Fuzzy Logic Simplifies Complex Control Problems" by Tom Williams, Computer Design magazine, pp 90-102 (March 1991).
In brief, however, the application of the theory requires the establishment of a set of rules conventionally referred to as "control rules", "inference rules" or "production rules" that represent the experience and know-how of an expert in the particular field in which a problem to be solved exists. The inference rules are represented in the form of IF . . . . (a conditional part or antecedent part) . . . THEN . . . . (a conclusion part or consequent part). This is conventionally referred to as an "If . . . Then" format. A large number of rules typically are assembled in an application rule base to adequately represent the variations that may be encountered by the application.
In addition, "membership functions" are defined for the "conditional parts" and the "conclusion parts". Specifically, variables in each of the parts are defined as fuzzy values or "labels" comprising relative word descriptions (typically adjectives), rather than precise numerical values. The set of values may comprise several different "levels" within a range that extends, for example, from "high" to "medium" to "low" in the case of a height variable. Each level will rely on a precise mapping of numerical input values to degrees of membership and will contain varying degrees of membership. For example, a collection of different levels of height from "high" to "low" may be assigned numerical values between 0 and 1. The collection of different levels is called a "fuzzy set" and the function of corresponding different height levels to numerical values is reflected by the "membership function. Conveniently, the set may be represented by a geometric form, such as a triangle, bell, trapezoid and the like.
Then, in the fuzzy inference control procedure, the inference control is carried out in several steps. First., a determination is made of the conformity with each of the input "labels" in the "conditional part" according to the inference rules. Second, a determination is made of conformity with the entire "conditional part" according to the inference rules. Third, the membership functions of the control variables in the "conclusion part" are corrected on the basis of the conformity with the entire "condition part" according to the inference rules. Finally, a control variable is determined on an overall basis, i.e., made crisp, from the membership functions of the control variables obtained according to the inference rules. The method of determining the control variable, i.e., obtaining a crisp value, is based on any of several processes, including the center of gravity process, the area process and the maximum height process.
The fuzzy inference rules and membership functions represent the knowledge of experts who are familiar with the characteristics of a complicated controlled object including non-linear elements, e.g. the temperature control of a plastic molding machine and the compounding control of chemicals, which are difficult to describe using mathematical models in a control theory. The fuzzy logic system employs a computer to perform the inference rule and membership function processing and thereby achieve expert-level inference.
In "Japanese Patent Disclosure Publication No. 95542 of 1990 (Cutting Adaptive Control System) fuzzy inference is applied to cutting and is made on the basis of an input signal from an external sensor. When fuzzy control is to be carried out in connection with the operations that encounter the above-stated third, fourth, fifth, sixth, seventh, eighth and ninth problems, the fuzzy inference that is to be performed must follow up the cutting of the machine tool. Since this requires very fast fuzzy inference to be made, software-executed fuzzy inference is not fast enough. Hence, a tenth problem results based on the requirement that a dedicated fuzzy chip, etc., must be installed in the CNC for performing processing on a hardware basis, leading to cost increases. Further, in a fuzzy inference method that is commonly applied to ordinary control operations (e.g., MIN.sub.---- MAX or center of gravity method), if the results of Rules 1, 2 and 3 are composed as shown in FIG. 33(a)-33(c), the results of Rules 1 and 3 influence the result of composition but the result of Rule 2 has no influence on the result of composition. This indicates that the result of rule 2 is totally ignored, which poses an eleventh problem that the results of all rules have not been taken into consideration in deducing a conclusion.
Further, there are generally very important rules and not so important ones, i.e., rules are different in significance. However, there is a twelfth problem in that, conventionally, all set rules are treated equally in the known fuzzy inference methods.